<script setup lang="ts">
import { ref } from "vue";
import Child from "./Child.vue";
import Child1 from "./Child1.vue";

const money = ref(10000);
const pageNum = ref(2);
const pageSize = ref(30);
</script>

<template>
  <div class="box">
    <h1>v-model: {{ money }}</h1>
    <div>页码：{{ pageNum }}, 每页条数：{{ pageSize }}</div>
    <div class="children">
      <Child v-model="money" />
      <Child1 v-model:pageNum="pageNum" v-model:pageSize="pageSize" />
    </div>
  </div>
</template>

<style scoped>
.box {
  width: 100%;
  height: 400px;
  background: skyblue;
  padding: 1rem;
}
.children {
  display: flex;
  justify-content: start;
  align-items: center;
  gap: 1em;
}
</style>
